<?php

use Jialeo\LaravelSchemaExtend\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateReadMessagesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('read_messages', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('push_id')->comment('发送用户id');
            $table->integer('user_id')->comment('接收用户ID');
            $table->integer('read_id')->comment('接收用户最新已读消息ID');
            $table->timestamps();

            $table->commet = '用户已读消息表';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('read_messages');
    }
}
